<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Counter</title>
</head>
<body>
  <script src="../dist/apprun-html.js"></script>
  <script>
  const add = (state, delta) => state + delta;
  const view = state => {
    return html`<div>
    <h1>${state}</h1>
      <button @click=${run('add', -1)}>-1</button>
      <button @click=${run('add', +1)}>+1</button>
      <button @click=${run(add, -1)}>-1</button>
      <button @click=${run(add, +1)}>+1</button>
      <button @click=${()=>app.run('add', -1)}>-1</button>
      <button @click=${()=>app.run('add', +1)}>+1</button>
    </div>`;
  };
  app.start(document.body, 0, view, { add });
  </script>
</body>

</html>